Repository navigation
fix(RVC4): run the GPU paths in the ASan/UBSan firmware - #2349
aljazkonec1 wants to merge 1 commit into
Conversation
The ASan runtime stops the process when a library is loaded with RTLD_DEEPBIND. The Adreno OpenCL driver loads libllvm-qcom.so this way when it builds a kernel, so on devices with a GPU the rvc4-asan-ubsan firmware aborted in each GPU path (ImageManip GPU backend, GPUStereo, camera undistortion, PointCloud, RGBD). The ASan build exports a dlopen from the executable that removes the flag and calls the next dlopen (the ASan interceptor). Other builds do not change.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fix the RVC4 ASan/UBSan firmware crash on every GPU path (Weekly ASan
linux_rvc4_test: 64 of 191 failed, 63 "FW crashed", job on GPU testbed slo6361-4pro).Root cause: the Adreno OpenCL driver loads
libllvm-qcom.sowithRTLD_DEEPBIND, and the ASan runtime stops the process on that flag; the ASan build now exports adlopenthat removes the flag and calls the ASan interceptor.Earlier ASan weeklies passed only because their testbeds had no GPU ("Skipping GPUStereo test: GPU not available", 11-28 job); the vanilla job of the same run passed on a GPU board (job).
Before (CI ASan fwp of 2d0d4c5, OAK4 with Adreno 740): GPU ImageManip and GPUStereo crash with "You are trying to dlopen a libllvm-qcom.so shared library with RTLD_DEEPBIND flag which is incompatible with sanitizer runtime".
After (ASan fwp of this branch, same board): GPU ImageManip 20/20 frames, GPUStereo (port of
gpu_stereo_device_test) 10/10, examples gpu_stereo, image_manip_resize, image_manip_remap, camera_undistortion run 40 s with no crash and no sanitizer report.Only the
DEPTHAI_ASAN_UBSANfirmware build changes; the release firmware and the host library are the same.Summary by CodeRabbit